class Address < ActiveRecord::Base
  attr_accessible :city, :complement, :district, :number, :state, :street, :zip
  
  def self.find_by_zip(zip)
    # AQUI VAMOS TER QUE CHAMAR ALGUM COMPONENTE
    # address = Address.new(:street => 'Av. Albert Einstein', :district => 'Cidade Universitaria', :city => 'Campinas', :state => 'SP')
    AddressInfo.new.find_by_zip zip
  end
end
